package com.core.zyyz.pcmc.service.impl;

import com.core.zyyz.amc.modules.domain.BaseDictionary;
import com.core.zyyz.constants.AmcCacheKeyConstants;
import com.core.zyyz.msdp.SpringContext;
import com.core.zyyz.redis.cache.MsdpCache;

import java.util.List;

public class ValueSetDictImpl {
    /**
     * 值集编号
     */
    private final String valueSetCode;

    public ValueSetDictImpl(String valueSetCode) {
        this.valueSetCode = valueSetCode;
    }

    public List<BaseDictionary> get() {
        String key = AmcCacheKeyConstants.generateDictKey(this.valueSetCode);
        MsdpCache cache = SpringContext.getBean(MsdpCache.class);
        return cache.getList(key);
    }
}
